﻿var ImageShow = {};
ImageShow.extendList = [".jpg", ".gif", ".jpeg", ".png"];
ImageShow.rarImageUrl = "/ImageShow/Get?type=0&id={0}";
ImageShow.menuImageUrl = "/ImageShow/Get?type=1&id={0}";
ImageShow.validateImage = function(filePath) {
    var pos = filePath.lastIndexOf(".");
    var extendName = filePath.substring(pos).toLowerCase();
    var extendList = this.extendList;
    if (extendList.contains(extendName)) {
        var img = new Image();
        img.src = filePath;
        //alert(img.fileSize);
    } else {
        return false;
    }
    return true;
}
ImageShow.setImageFormat = function() {
    if (arguments.length > 0) {
        var tmpFormat = arguments[0], tmpArg = [];
        if (tmpFormat instanceof Array) {
            tmpArg = arguments[0]
        } else {
            tmpArg = [].slice.call(arguments).slice(0);
        }
        this.extendList = tmpArg;
    }
}
ImageShow.getRarImage = function(rarID) { 

}
